From 63d7a82faeb6d4292362dfbe1fb8f41b0d1037c8 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Mon, 5 Mar 2007 14:20:26 +0000 Subject: [PATCH] linux: Prefer testing io_bitmap_ptr to the TIF_IO_BITMAP. Former is safer (in case TIF_IO_BITMAP is out-of-sync with actual existence of an I/O bitmap for this process) and more readable, and probably results in faster code too. Signed-off-by: Keir Fraser --- linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c index 051e5ab202..2225fcc962 100644 --- a/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c +++ b/linux-2.6-xen-sparse/arch/i386/kernel/process-xen.c @@ -605,8 +605,7 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas mcl++; } - if (unlikely(test_tsk_thread_flag(prev_p, TIF_IO_BITMAP) - || test_tsk_thread_flag(next_p, TIF_IO_BITMAP))) { + if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr)) { iobmp_op.bitmap = (char *)next->io_bitmap_ptr; iobmp_op.nr_ports = next->io_bitmap_ptr ? IO_BITMAP_BITS : 0; mcl->op = __HYPERVISOR_physdev_op; -- 2.30.2